package cn.maihe.elg.operation.config;

import cn.maihe.elg.operation.interceptor.ElgLogInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @Description
 * @Author WJH
 * @Date 2021/10/09
 */
@Configuration
public class ElgWebMvcConfigurer implements WebMvcConfigurer {
    @Resource
    private ElgLogInterceptor elgLogInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(elgLogInterceptor);
    }

}
